  <table CELLPADDING="2" CELLSPACING="0" BORDER="0">
    <tr>
      <td>
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr bgcolor="#cccccc">
          <td>
            <table CELLPADDING="2" CELLSPACING="1" BORDER="0" WIDTH="100%">
              <tr BGCOLOR="#7EC1F3">
                <th WIDTH="2%"><br></th>

<%
    for(int i = 1; i <=7; i++)
    {
%>
          <th ALIGN="left" WIDTH="14%"><font size="-1" face="Arial,Helvetica"><%=BoxStatic.shortWeekSymbols[i]%></font></th>
<%   }  %>
            </tr>
<%
    Calendar start = Calendar.getInstance(sec.getTimeZone());
    Calendar end = Calendar.getInstance(sec.getTimeZone());
    home.getMonthStartEnd(start,end,currentDate);

    long endTime = end.getTime().getTime();
    Calendar tmpWeekBegin = (Calendar) start.clone();
    tmpDay.setTime(start.getTime());
    int currentYear = currentDate.get(Calendar.YEAR);
    int currentMonth = currentDate.get(Calendar.MONTH);
    int currentDay = currentDate.get(Calendar.DAY_OF_YEAR);
    while(tmpWeekBegin.getTime().getTime() <= endTime)
    {
      tmpDay.setTime(tmpWeekBegin.getTime());
%>
            <tr BGCOLOR="#dcdcdc">
              <td width="1%" ALIGN="middle" ROWSPAN="2" VALIGN="top" BGCOLOR="#7EC1F3">
              <small><a href="<%=BoxStatic.servletDir%>BoxReservationViewAction?VIEW_FORMAT=WEEK&t=<%=tmpWeekBegin.getTime().getTime()%>">week view</a> </small>
              </td>
<%
      for(int i = 1; i <= 7; i++)
      {
        if ( today.get(Calendar.DAY_OF_YEAR) == tmpDay.get(Calendar.DAY_OF_YEAR)
            && today.get(Calendar.YEAR) == tmpDay.get(Calendar.YEAR) )
        {
          out.print("<td ALIGN=\"left\" BGCOLOR=\"#ffffcc\">");
        }
        else
          out.print("<td ALIGN=\"left\">");

        if ( tmpDay.get(Calendar.MONTH) == currentMonth)
        {
%>
              <a href="<%=BoxStatic.servletDir%>BoxReservationViewAction?VIEW_FORMAT=DAY&t=<%=tmpDay.getTime().getTime()%>"><b><%=tmpDay.get(Calendar.DATE)%></b></a>&nbsp;&nbsp;&nbsp;
              <a href="<%=BoxStatic.servletDir%>BoxReservationAction?SubmitEdit=edit&t=<%=tmpDay.getTime().getTime()%>"><font SIZE="1">Add</font></a>
              </td>
<%
        }
        else
        {
%>
              <a href="<%=BoxStatic.servletDir%>BoxReservationViewAction?VIEW_FORMAT=DAY&t=<%=tmpDay.getTime().getTime()%>"><font COLOR="#777777">
              <b><%=tmpDay.get(Calendar.DATE)%></b></font></a>&nbsp;&nbsp;&nbsp;<a
              href="<%=BoxStatic.servletDir%>BoxReservationAction?SubmitEdit=edit&t=<%=tmpDay.getTime().getTime()%>"><font SIZE="1">Add</font></a></td>
<%
        }

        tmpDay.add(Calendar.DATE,1);
      }//end for

      out.print("</tr> <tr BGCOLOR=\"#ffffff\">");

      tmpDay.setTime(tmpWeekBegin.getTime());
      for(int i = 1; i <= 7; i++)
      {
        Iterator it = null;
        if (RESOURCECATID == -1 && RESOURCEID == -1)
          it = home.getAllEntries(tmpDay, curUserID, VIEW_MINE!=0, SORTBY, sortAsc);
        else if ( RESOURCECATID != -1 )
          it = home.getEntriesByCat(tmpDay, curUserID, VIEW_MINE!=0, RESOURCECATID, SORTBY, sortAsc);
        else
          it = home.getEntries(tmpDay, curUserID, VIEW_MINE!=0, RESOURCEID, SORTBY, sortAsc);

        if ( it != null && it.hasNext())
        {
%>
       <td VALIGN="top" BGCOLOR="white">
        <Common:Iteration name="entry" type="BoxReservationEntry" group="<%=it%>">
              <font SIZE="2">
              <a href="<%=BoxStatic.servletDir%>BoxReservationAction?SubmitEdit=edit&ID=<%=entry.getID()%>"><%=home.getEntryString(entry,SORTBY,sec.getTimeZone())%></a> </font><br>
        </Common:Iteration>

<%
          out.print("<br></td>");
        }
        else
        {
          out.print("<td VALIGN=\"top\" BGCOLOR=\"#eeeeee\"><br></td>");
        }
        tmpDay.add(Calendar.DATE,1);
      }//end for
      tmpWeekBegin.add(Calendar.DATE,7);
    } //end while
%>

          </table>
          </td>
        </tr>
      </table>
      </td>
    </tr>
    <tr>
      <td align="right"><font color="#ffffff">___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
      ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
      ___ ___ ___ ___ ___ ___ </font></td>
    </tr>
  </table>

